package com.ruoyi.common.utils;

import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;

/**
 * @author dyun
 */
public class CommonUtil {

    /**
     * 时间格式：2012-01-01T20:20:20+08:00
     */
    public static String formatDateTime(TemporalAccessor time) {
        return DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'+08:00'").format(time);
    }

}
